
import {rolelist} from "../../requset/api"
export const state ={
    list:[]
}

export const mutations={
    changeRole(state,arr){
        state.list=arr
    }
}

export const actions ={
    reqChangeRole(context){
        rolelist().then(res=>{
            let list =res.data.list?res.data.list:""
            context.commit("changeRole",list)
        })
    }
}

export const getters={
        list(state){
            return state.list
        }
}

export default{
    state,
    mutations,
    actions,
    getters,
    namespaced:true
}